import { request } from '@umijs/max';

// 请求质量检测列表
export async function queryTestReportList(body: any, options?: { [key: string]: any }) {
  return request('/qualityinspection/qualityinspectionlist', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

// 更新检测报告
export async function updateTestReport(body: any, options?: { [key: string]: any }) {
  return request('/qualityinspection/qualityinspectionupdate', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

// 新增检测报告
export async function addTestReport(body: any, options?: { [key: string]: any }) {
  return request('/qualityinspection/qualityinspectionadd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

// 删除检测报告
export async function delTestReport(body: any, options?: { [key: string]: any }) {
  return request('/qualityinspection/qualityinspectiondelete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

